define(()=>{
    return function(){
        $.ajax({
            url:"http://localhost:81/data/pro.json",
            success:(res)=>{
                // console.log(res)
                res = JSON.parse(res);
                let str = "";
                for(let i=0;i<res.length;i++){
                    str += `<div class="hot-list"><a href="detail/index.html?id=${res[i].proId}">
                                <img src="${res[i].proImg}" alt="">
                                <p>${res[i].proName}</p>
                                <span>${res[i].proInfo}</span>
                                <em>${res[i].price}</em>
                            </a></div>`
                }
                $(".hot-cont").html(str);
            }
        })
    }
})